package com.atguigu.springcloud;

import com.atguigu.myRule.MySelfRule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.core.env.Environment;

/**
 * @Auther:
 * @Description:
 * @Date: 2019/11/22 10:31
 */
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients(basePackages = "com.atguigu.springcloud")
//@RibbonClient(name = "MICROSERVICECLOUD-DEPT", configuration = MySelfRule.class)
@RibbonClient(name = "MICROSERVICECLOUD-CONFIG-DEPT-CLIENT", configuration = MySelfRule.class)
public class DeptConsumer80_Config_Feign_App {
    private static final Logger logger = LoggerFactory.getLogger(DeptConsumer80_Config_Feign_App.class);

    public static void main(String[] args) {
        Environment environment = SpringApplication.run(DeptConsumer80_Config_Feign_App.class).getEnvironment();
        logger.info("\n http://myzuul.com:9527/atguigu/mydept/consumer_feign/dept/get/1");
    }
}
